/**
 * 
 */
package metalink.admin;

import java.util.ArrayList;

import sun.awt.image.IntegerComponentRaster;
import vo.mixed.HostelStudentVo;
import model.admin.HostelMo;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Sony
 *
 */
public class DeleteRoom extends ActionSupport{
	String room_id;
	int[] residential_id1;
	int residential_id;
	ArrayList<HostelStudentVo> studentDetailsList;
	
	public ArrayList<HostelStudentVo> getStudentDetailsList() {
		return studentDetailsList;
	}

	public void setStudentDetailsList(ArrayList<HostelStudentVo> studentDetailsList) {
		this.studentDetailsList = studentDetailsList;
	}

	public String execute() {
		HostelMo mo = new HostelMo();
		try {
			mo.deleteRoom(Integer.parseInt(room_id),"deleteRoom");
			studentDetailsList = mo.getAllStudentsFromHostels(residential_id);
			
		} catch (Exception e) {
			addActionError(e.getMessage());
		}
		return SUCCESS;
	}
	
	public int getResidential_id() {
		return residential_id;
	}

	public void setResidential_id(int residential_id) {
		this.residential_id = residential_id;
	}

	public String getRoom_id() {
		return room_id;
	}
	public void setRoom_id(String room_id) {
		this.room_id = room_id;
	}
	public int[] getResidential_id1() {
		return residential_id1;
	}
	public void setResidential_id1(int[] residential_id1) {
		this.residential_id1 = residential_id1;
	}
	
}
